package com.woniuxy.redenvelope.controller;

import com.github.pagehelper.PageInfo;
import com.woniuxy.commons.request.ResponseResult;
import com.woniuxy.redenvelope.entity.Record;
import com.woniuxy.redenvelope.service.KillRedEnvelopeSerice;
import com.woniuxy.redenvelope.service.RecordSerice;
import com.woniuxy.redenvelope.vo.AddKillVo;
import com.woniuxy.redenvelope.vo.RecordVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/record")
public class RecordController {

    @Resource
    private RecordSerice redEnvelopeSerice;
    @GetMapping("/findAll")
    public ResponseResult<PageInfo<RecordVo>> findAll(Integer currentPage, Integer pageSize, String name){
        return new ResponseResult<>(ResponseResult.OK,redEnvelopeSerice.findAll(currentPage,pageSize,name));
    }

}
